<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

    <#include "/common/elibs.html">

</head>
<body class="login-bg">
    
    <div class="login layui-anim layui-anim-up">
        <div class="message">鄂尔多斯供电局班组办公系统</div>
        <div id="darkbannerwrap"></div>
        
        <form method="post" class="layui-form" >
            <input name="username" id="username" placeholder="用户名"  type="text" lay-verify="required" class="layui-input" >
            <hr class="hr15">
            <input name="password" id="password" lay-verify="required" placeholder="密码"  type="password" class="layui-input">
            <hr class="hr15">
            <input value="登录" lay-submit lay-filter="login" style="width:100%;" type="submit">
            <hr class="hr20" >
        </form>
    </div>

    <script>
        $(function  () {
            layui.use('form', function(){
              var form = layui.form;
              //监听提交
              form.on('submit(login)', function(data){
              	var params = '';
              	params = {
              		"userName":$("#username").val(),
              		"password":$("#password").val()
              	}
                $.ajax({
		            url: path+'/pc/user/loginPC',
		            type: 'get',
		            // contentType : 'application/json',
		            // dataType: 'json',
		            data: params,
		            success:function(data){
		                if(data.code != 0){
		                    layer.open({
		                        title: '提示信息'
		                        ,content: data.message
		                    });
		                }else{
		                    localStorage.setItem("token", data.data.accessToken);
		                    window.location.href = path+"/index.html";
		                }
		            }
		        })
                return false;
              });
              
            });
            
            //班组图片查询
        
        
        })

        
    </script>

    
    <!-- 底部结束 -->

</body>
</html>